//day-one.js

let name='yuan';
let age=30;
let isStudent=true;
let data=null;
let x;
const id=Symbol(isStudent);

let numbers=[1,2,3,4,5];

let person={name:"alicy",age:40};


function greet(){

	return "Hello";
}

console.log(person);

//隐式类型转换

/*

字符串转换
数值转换

*/

let num=10;

let str ="The numbers is "+num;

console.log(str);



let nums="30";

let result = nums*2;

console.log(result);

//显式类型转换

/*
字符串转换String()
数值转换Number()
布尔值转换Boolean()
手动转换parseInt() 或者 parseFloat()
*/

let num_str=123;

let str_num=String(num_str);

console.log(str_num);


let number_str="123";

let str_number=Number(num_str);

console.log(str_number);

let value=-1;

let boolvalue=Boolean(value);

console.log(boolvalue);

let intNum=parseInt("32");

let values=-1;

let boolvalues=Boolean(values);

console.log(boolvalues);

let floatNum=parseFloat("3.14");

console.log(intNum,floatNum);

console.log(20%17);

let a=10,b=20,c=5,d=17,e,m;

e=(e=a>3?b:c,m=e<b++?c--:a=3>b%d?27:37,m++);


/*
e=a>3?b:c =》 e=20
a=3>b%d?27:37=》a=37 

m=e<b++?c--:37=>

*/


console.log(a);
console.log(b);
console.log(c);
console.log(d);
console.log(m);
console.log(e);

//3,37,21,5,17,38,37